<template>
    <div class="body msgDetial" v-if="ifshow">
        <h2 v-html="title"></h2>
        <div v-html="content"></div>
    </div>
</template>

<script>
    export default {
        name: "msgDetial",
        data(){
            return {
                ifshow:false,
                title:"",
                content:""
            }
        },
        mounted(){
            this.getDetial();
        },
        methods:{
            getDetial(){
                this.axios({
                    method: 'get',
                    url: '/apis/partner/pullMessageById/'+this.$route.query.msgId,
                    data: {

                    },
                    headers: {'token':JSON.parse(localStorage.hhrdata).token},
                    withCredentials: true,
                }).then((response) => {
                    console.log(response)
                    if(response.data.code==-8){
                        //this.common.checkLogin(this);
                    }
                    this.title = response.data.data.title;
                    this.content = response.data.data.content
                    this.ifshow = true;
                }).catch((error) => {
                    console.log(error);
                });
            }
        }
    }
</script>

<style scoped lang="less">
    .msgDetial{
        h2{
            font-size:0.32rem;
            font-weight: 500;
            color:rgba(102,102,102,1);
            padding: 0.2rem;
            margin-top: 0.2rem;
            overflow: hidden;
        }
        div{
            padding: 0.2rem;
            font-size:0.2rem;
        }
    }

</style>
